﻿using System;

namespace Inaction.Criteria
{
    [AttributeUsage(AttributeTargets.Field)]
    public class CriteriaFieldAttribute : System.Attribute
    {
        public string ColumnName { get; set; }

        public string FormatColumnName { get { return string.IsNullOrEmpty(ColumnName) ? null : DbProvider.Instance.FormatName(ColumnName); } }
        public CriteriaOperate Operate { get; set; }
        public CriteriaLogic Logic { get; set; }
        public CriteriaFieldAttribute(string columnName)
        {
            this.ColumnName = columnName;
        }
    }
}
